<%--
  Created by IntelliJ IDEA.
  User: hellcat
  Date: 2020/2/18
  Time: 18:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@include file="header.jsp" %>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <a class="layui-logo" href="${pageContext.request.contextPath }/user/Index"
           style="font-size: 20px; font-family: 方正姚体">生鲜超市销售管理系统</a>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <%--            <li class="layui-nav-item"><a href="">新品上架</a></li>--%>
            <%--            <li class="layui-nav-item"><a href="">打折设置</a></li>--%>
            <%--            <li class="layui-nav-item"><a href="">商品下架</a></li>--%>
            <%--            <li class="layui-nav-item">--%>
            <%--                <a href="javascript:;">其它系统</a>--%>
            <%--                <dl class="layui-nav-child">--%>
            <%--                    <dd><a href="">邮件管理</a></dd>--%>
            <%--                    <dd><a href="">消息管理</a></dd>--%>
            <%--                    <dd><a href="">授权管理</a></dd>--%>
            <%--                </dl>--%>
            <%--            </li>--%>
        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="menuSelection">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="layui-icon">&#xe770;</i>
                    <shiro:principal property="name"/>
                </a>
                <dl class="layui-nav-child">
                    <dd><a id="Basic1" href="javascript:;">基本资料</a></dd>
                    <dd><a href="${pageContext.request.contextPath }/user/logout">安全退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） lay-shrink="all"-->
            <ul class="layui-nav layui-nav-tree" lay-filter="menuSelection" lay-shrink="all">
                <shiro:hasPermission name="report:showReport">
                    <li class="layui-nav-item">
                        <a href="javascript:;" style="font-size: 18px">
                            <i class="layui-icon layui-icon-chart" style="font-size: 20px; color: #1E9FFF;"></i>
                            报&emsp;&emsp;表</a>
                        <dl class="layui-nav-child">
                            <shiro:hasPermission name="report:stockReport:list">
                                <dd><a id="StockReport" href="javascript:" style="font-size: 18px;">&emsp;&ensp;库存报表</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="report:purchaseReport:list">
                                <dd><a id="PurchaseReport" href="javascript:"
                                       style="font-size: 18px;">&emsp;&ensp;进货报表</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="report:saleReport:list">
                                <dd><a id="SaleReport" href="javascript:"
                                       style="font-size: 18px;">&emsp;&ensp;销售报表</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="report:reduceReport:list">
                                <dd><a id="ReduceReport" href="javascript:"
                                       style="font-size: 18px;">&emsp;&ensp;退货报表</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="report:damageReport:list">
                                <dd><a id="DamageReport" href="javascript:"
                                       style="font-size: 18px;">&emsp;&ensp;报损报表</a>
                                </dd>
                            </shiro:hasPermission>
                        </dl>
                    </li>
                </shiro:hasPermission>
                <shiro:hasPermission name="wares:showWares">
                    <li id="WaresMenu" class="layui-nav-item">
                        <a href="javascript:;" style="font-size: 18px">
                            <i class="layui-icon layui-icon-diamond" style="font-size: 20px; color: #1E9FFF;"></i>
                            商&emsp;&emsp;品</a>
                        <dl class="layui-nav-child">
                            <shiro:hasPermission name="wares:wares:list">
                                <dd><a id="Wares" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;商品管理</a></dd>
                            </shiro:hasPermission>

                            <shiro:hasPermission name="wares:category:list">
                                <dd><a id="Category" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;分类管理</a>
                                </dd>
                            </shiro:hasPermission>

                            <shiro:hasPermission name="wares:priceChange:list">
                                <dd><a id="PriceChange" href="javascript:;"
                                       style="font-size: 18px;">&emsp;&ensp;进价变动</a>
                                </dd>
                            </shiro:hasPermission>
                        </dl>
                    </li>
                </shiro:hasPermission>
                <shiro:hasPermission name="purchase:showPurchase">
                    <li class="layui-nav-item">
                        <a href="javascript:;" style="font-size: 18px">
                            <i class="layui-icon layui-icon-cart-simple" style="font-size: 20px; color: #1E9FFF;"></i>
                            采&emsp;&emsp;购</a>
                        <dl class="layui-nav-child">
                            <shiro:hasPermission name="purchase:purchaseOrder:list">
                                <dd><a id="PurchaseOrder" href="javascript:"
                                       style="font-size: 18px;">&emsp;&ensp;进货单</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="purchase:reduceOrder:list">
                                <dd><a id="ReduceOrder" href="javascript:" style="font-size: 18px;">&emsp;&ensp;退货单</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="wares:saleOrder:list">
                                <dd><a id="SaleOrder" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;销售单</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="wares:damageOrder:list">
                                <dd><a id="DamageOrder" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;报损单</a>
                                </dd>
                            </shiro:hasPermission>
                        </dl>
                    </li>
                </shiro:hasPermission>
                <shiro:hasPermission name="promotion:showPromotion">
                    <li class="layui-nav-item">
                        <a href="javascript:;" style="font-size: 18px">
                            <i class="layui-icon layui-icon-flag" style="font-size: 20px; color: #1E9FFF;"></i>
                            活&emsp;&emsp;动</a>
                        <dl class="layui-nav-child">
                            <shiro:hasPermission name="promotion:promotion:list">
                                <dd><a id="Promotion" href="javascript:" style="font-size: 18px;">&emsp;&ensp;促销活动</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="promotion:sale:list">
                                <dd><a id="Sale" href="javascript:" style="font-size: 18px;">&emsp;&ensp;活动商品</a>
                                </dd>
                            </shiro:hasPermission>
                        </dl>
                    </li>
                </shiro:hasPermission>
                <shiro:hasPermission name="stuff:showStuff">
                    <li class="layui-nav-item">
                        <a href="javascript:;" style="font-size: 18px">
                            <i class="layui-icon layui-icon-user" style="font-size: 20px; color: #1E9FFF;"></i>
                            员&emsp;&emsp;工</a>
                        <dl class="layui-nav-child">
                            <shiro:hasPermission name="stuff:stuff:list">
                                <dd><a id="Staff" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;员工信息</a>
                                </dd>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="stuff:authority:list">
                                <dd><a id="Authority" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;角色权限</a>
                                </dd>
                            </shiro:hasPermission>

                        </dl>
                    </li>
                </shiro:hasPermission>
                <li class="layui-nav-item">
                    <a href="javascript:;" style="font-size: 18px">
                        <i class="layui-icon layui-icon-set" style="font-size: 20px; color: #1E9FFF;"></i>
                        系&emsp;&emsp;统</a>
                    <dl class="layui-nav-child">
                        <dd><a id="Basic" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;账户信息</a>
                        <dd><a id="Store" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;超市信息</a>
                            <shiro:hasPermission name="log:showLog">
                        <dd><a id="Log" href="javascript:;" style="font-size: 18px;">&emsp;&ensp;日志系统</a>
                            </shiro:hasPermission>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <script>
        if ("${ddId}" != null && "${ddId}" != "") {
            // $("#WaresMenu").attr("class", "layui-nav-item");
            $("#" + "${ddId}").parent().parent().parent().attr("class", "layui-nav-item layui-nav-itemed");
            $("#" + "${ddId}").parent().attr("class", "layui-this");
        }
    </script>
    <div class="layui-body" id="mains">
        <div style="padding:15px 0 5px;">
